import { RMIObject } from "../../Engine/RMI/RMIObject";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqAchievementCategroyHelper } from "./SeqAchievementCategroyHelper";
import { Exception } from "../../Framework/Util/Exception";
//class AMI_IAchievement_achievementOverview

export class AMI_IAchievement_achievementOverview extends RMIObject {
  constructor(arg1?: Function, arg2?: Function, arg3?: any) {
    super(arg1, arg2);
    this.userObject = arg3;
    this.callFunction = "achievementOverview";
    return;
  }

  public /* override */ __response(arg1: SerializeStream): void {
    var __is: SerializeStream;
    var achievementCategroys: Array<any>;

    var loc1;
    __is = arg1;
    try {
      achievementCategroys = SeqAchievementCategroyHelper.read(__is);
    } catch (__ex) {
      this.cdeException(
        new Exception(
          "ExceptionCodeSerialize",
          Exception.ExceptionCodeSerialize
        )
      );
      return;
    }
    this.cdeResponse(achievementCategroys);
    return;
  }

  public cdeResponse(arg1: Array<any>): void {
    if (this._response) {
      this._response.call(null, this, arg1);
    }
    return;
  }
}
